import configparser,os

file_path = os.path.join(os.path.abspath(os.path.dirname(os.path.dirname(__file__))), "config/config.ini")
def read(data,data_name):
    cf = configparser.ConfigParser()
    cf.read(file_path, encoding='utf-8')
    data = cf.get(data,data_name)
    return data
def write(dataFilePath):
    cf = configparser.ConfigParser()
    cf.read(file_path)
    cf.set("userDataPath","path",dataFilePath)
    with open(file_path,"r+") as f:
        cf.write(f)


if __name__ == '__main__':
    a = read('mail_send','email')
    print(a.split(','))


    # print (os.path.join(os.path.abspath(os.path.dirname(os.path.dirname(__file__))) ,r"hehe"))